package com.itheima.leibulei;

/*
游泳接口
*/

public class TestSwimming{
    public static void main(String[] args){
        goSwimming(new Swimming() {
            @Override
            public void swim() {
                System.out.println("去游泳吧");
            }
        });
    }

    public static void goSwimming(Swimming swimming){
        swimming.swim();
    }
}
interface Swimming{
     void swim();
}